From 78db438123f7a412e07e9a410bab4cdff1e9d6df Mon Sep 17 00:00:00 2001 From: parkrrrr Date: Tue, 17 Jan 2006 21:59:12 +0000 Subject: [PATCH] backslashes are escaped in the new format - test case BNA to DFW --- gpsbabel/google.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gpsbabel/google.c b/gpsbabel/google.c index d73d4e6cd..0b1168050 100644 --- a/gpsbabel/google.c +++ b/gpsbabel/google.c @@ -183,6 +183,10 @@ static long decode_goog64( char **str ) long result = 0; unsigned char c = 0; unsigned char shift = 0; + + if ( !(**str)) { + return 0; + } do { @@ -306,9 +310,17 @@ google_read(void) end = strchr( encoded_points, '\'' ); if ( end ) { *end = '\0'; + end = encoded_points; + while ( (end = strstr(end, "\\\\" ))) { + memmove( end, end+1, strlen(end)+1 ); + } end = strchr( encoded_levels, '\'' ); if ( end ) { *end = '\0'; + end = encoded_levels; + while ( (end = strstr(end, "\\\\" ))) { + memmove( end, end+1, strlen(end)+1 ); + } goog_poly_e( NULL, NULL ); } } -- 2.30.2